#!/bin/bash

#author:hzwuyufeng
#email:hzwuyufeng@corp.netease.com

#create time:10/16/2015 #version:0.1

# All ndk project must be included
NDK_PROJECT_ARRAY=(
    "common/src/main/jni"
    "pdfium/src/main/jni"
)

# Build NDK project
function build_ndk_project() {
    local PROJECT=$1
    ndk-build clean -C ${PROJECT}
    ndk-build -C ${PROJECT}
}

# Build JNI
function build_jni() {
    for project in "${NDK_PROJECT_ARRAY[@]}";
    do
        build_ndk_project ${project}
    done
}

function build_app() {
    ./gradlew -v
    ./gradlew clean
    ./gradlew $1
}

function build() {
    build_jni
}

build